public class Test {
    public static void main(String[] args) {
        int[] nums = {3,2,1,5,6,4};
        int k = 2;

        int[] nums1 = {3,2,3,1,2,4,5,5,6};
        int k1 = 4;

        int[] nums2 = {7,6,5,4,3,2,1};
        int k2 = 5;

        Solution2 s = new Solution2();
        System.out.println(s.findKthLargest(nums, k));
        System.out.println(s.findKthLargest(nums1, k1));
        System.out.println(s.findKthLargest(nums2, k2));
    }
}
